package com.onepower.core.modules.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.onepower.core.domain.request.MatchScheduleQuery;
import com.onepower.core.domain.response.MatchCheckInfo;
import com.onepower.core.domain.response.MatchScheduleInfo;
import com.onepower.core.modules.repository.entity.MatchSchedule;
import com.onepower.core.modules.repository.entity.extend.MatchScheduleExtend;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 比赛场次表 Mapper 接口
 * </p>
 *
 * @author kin
 * @since 2018-08-06
 */
public interface MatchScheduleMapper extends BaseMapper<MatchSchedule> {

    List<MatchScheduleExtend> selectScheduleListWithNoCheck(Page<MatchCheckInfo> page, Integer matchPlaceId);

    MatchScheduleExtend selectScheduleById(@Param("id") int id);

    List<MatchScheduleExtend> selectScheduleList(Page<MatchScheduleInfo> page, @Param("query") MatchScheduleQuery query);

    List<MatchScheduleExtend> selectLockedSchedule(@Param("matchId") int matchId,
                                                   @Param("matchAdminId") int matchAdminId,
                                                   @Param("multiType") int multiType);

    List<MatchSchedule> selectTwoSchedule(@Param("matchId") int mathcId);

    List<Map<String,Object>> matchScheduleForCodeList();

	List<Map<String, Object>> getMatchScheduleCodeByMatchPlace(Integer matchId, Integer matchPlaceId);

}